<!-- Faraday Penetration Test IDE -->
<!-- Copyright (C) 2013  Infobyte LLC (http://www.infobytesec.com/) -->
<!-- See the file 'doc/LICENSE' for the license information -->
<section id="main" class="seccion clearfix">
  <div class="faraday-header-border-fix"></div>
    <div class="right-main">
        <div ng-controller="headerCtrl" ng-include="'scripts/commons/partials/header.html'"></div>
        <div id="reports-main" class="fila clearfix">
        <div class="jumbotron">
            <h1><b>Welcome!</b></h1>
            <p>These are your available workspaces</p>
        </div><!-- .jumbotron -->
        <div class="reports normal-size">
            <table class="table-v3 licenses-list table table-responsive">
                <thead>
                    <tr class="ui-grid-header">
                        <th class="ui-grid-cell-contents ui-grid-header-cell">Read only</th>
                        <th class="ui-grid-cell-contents ui-grid-header-cell">Active</th>
                        <th class="ui-grid-cell-contents ui-grid-header-cell">Name</th>
                        <th class="ui-grid-cell-contents ui-grid-header-cell">Vulns</th>
                        <th class="ui-grid-cell-contents ui-grid-header-cell">Hosts</th>
                        <th class="ui-grid-cell-contents ui-grid-header-cell">Services</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="ws in workspaces">
                        <td class="ui-grid-cell-contents active-toggle">
                            <div class="toogle-img-container">
                                <span ng-click="readonlyToggle(ws)" class="active-toggle-container" ng-class="{ disabled:ws.readonly === false }" uib-tooltip="{{(ws.readonly === false) ? 'Workspace with all permissions' : 'Workspace read only'}}" tooltip-placement="right">
                                    <img ng-src="{{ (ws.readonly == true) ? 'images/icon-list-confirmed.svg' : 'images/icon-list-notconfirmed.svg'}}" class="confirm-icon" ng-style="{ 'opacity': (ws.readonly === true) ? '1' : '0.7' }" />
                                </span>
                            </div>
                        </td>

                        <td class="ui-grid-cell-contents active-toggle">
                            <div class="toogle-img-container">
                                <span ng-click="activeToggle(ws)" class="active-toggle-container" ng-class="{ disabled:ws.active === false }" uib-tooltip="{{(ws.active === true) ? 'Disable workspace' : 'Enable workspace'}}" tooltip-placement="right">
                                    <img ng-src="{{ (ws.active) ? 'images/icon-list-confirmed.svg' : 'images/icon-list-notconfirmed.svg'}}" class="confirm-icon" ng-style="{ 'opacity': (ws.active === true) ? '1' : '0.7' }" />
                                </span>
                            </div>
                        </td>
                        <td class="ui-grid-cell-contents">
                            <span class="onhover upsize" ng-click="redirect(ws.name)">
                                <b>{{ws.name}}</b>
                            </span>
                        </td>
                        <td ng-bind="objects[ws.name]['total_vulns']" class="ui-grid-cell-contents"></td>
                        <td ng-bind="objects[ws.name]['hosts']" class="ui-grid-cell-contents"></td>
                        <td ng-bind="objects[ws.name]['services']" class="ui-grid-cell-contents"></td>
                    </tr>
                </tbody>
            </table>
        </div><!-- .reports -->
    </div><!-- #reports-main --></div><!-- .right-main -->
</section>
